{
cairo_pattern_t *pattern;
cairo_matrix_t matrix;
- GtkAllocation border_allocation;
+ int width, height;
GskRoundedRect content_box;
- gtk_widget_get_border_allocation (widget, &border_allocation);
+ gtk_widget_get_content_size (widget, &width, &height);
gtk_rounded_boxes_init_for_style (NULL,
NULL,
&content_box,
gtk_style_context_lookup_style (context),
0, 0,
- border_allocation.width,
- border_allocation.height);
+ width, height);
gtk_snapshot_push_rounded_clip (snapshot,
&content_box,
"ColorSwatchClip");
if (icon_info == NULL)
continue;
- gtk_widget_get_border_allocation (icon_info->widget, &allocation);
- if (x >= allocation.x && x < allocation.x + allocation.width &&
- y >= allocation.y && y < allocation.y + allocation.height)
+ gtk_widget_get_outer_allocation (icon_info->widget, &allocation);
+ if (gdk_rectangle_contains_point (&allocation, x, y))
return i;
}
{
GtkAllocation allocation;
- gtk_widget_get_border_allocation (page->tab_widget, &allocation);
+ gtk_widget_get_outer_allocation (page->tab_widget, &allocation);
switch (priv->tab_pos)
{
y = priv->mouse_y;
gtk_widget_get_own_allocation (widget, &range_alloc);
- gtk_widget_get_border_allocation (priv->trough_widget, &trough_alloc);
+ gtk_widget_get_outer_allocation (priv->trough_widget, &trough_alloc);
gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
gtk_widget_translate_coordinates (priv->trough_widget, widget,
gtk_widget_get_content_size (widget, &range_width, &range_height);
slider_widget = gtk_range_get_slider_widget (range);
- gtk_widget_get_border_allocation (slider_widget, &slider_alloc);
+ gtk_widget_get_outer_allocation (slider_widget, &slider_alloc);
gtk_widget_measure (priv->value_widget,
GTK_ORIENTATION_HORIZONTAL, -1,
margin.bottom + border.bottom + padding.bottom;
}
-void
-gtk_widget_get_border_allocation (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
- GtkBorder margin, border;
- GtkCssStyle *style;
-
- style = gtk_css_node_get_style (priv->cssnode);
- get_box_margin (style, &margin);
- get_box_border (style, &border);
-
- *allocation = priv->allocation;
-
- allocation->x += margin.left + border.left;
- allocation->y += margin.top + border.top;
- allocation->width -= margin.left + border.left +
- margin.right + border.right;
- allocation->height -= margin.top + border.top +
- margin.bottom + border.bottom;
-}
-
/**
* gtk_widget_get_allocated_width:
* @widget: the widget to query
gboolean gtk_widget_focus_move (GtkWidget *widget,
GtkDirectionType direction,
GPtrArray *focus_order);
-void gtk_widget_get_border_allocation (GtkWidget *widget,
- GtkAllocation *allocation);
void gtk_widget_get_outer_allocation (GtkWidget *widget,
GtkAllocation *allocation);
void gtk_widget_get_own_allocation (GtkWidget *widget,